package com.example.demo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.demo.entity.SysDept;
import org.apache.ibatis.annotations.Select;
import org.mapstruct.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface DeptMapper extends BaseMapper<SysDept> {

    @Select("select * from eo_e_dept where name=#{name}")
    SysDept selectByName(String name);

    @Select("select * from t_department where out_id=#{outId}")
    SysDept selectByOutId(String outId);

    @Select("select * from t_department")
    List<SysDept> getAllDepartments();
}
